const imgs =[
	'https://static.biligame.com/fgo/gw/pc/img/index/banner-1.jpg',
	'https://static.biligame.com/fgo/gw/pc/img/index/banner-2.jpg',
	'https://static.biligame.com/fgo/gw/pc/img/index/banner-3.jpg',
	'https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg',
	'https://ossweb-img.qq.com/images/lol/web201310/skin/big39002.jpg',
	'https://ossweb-img.qq.com/images/lol/web201310/skin/big39003.jpg',
	'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
]

const randomCN=(lang=0)=>{
	let str =''
	for(let i =0;i<lang;i++){
		str+=String.fromCharCode(Math.round(Math.random() * 20901) + 19968)
	}
	return str;
}
const randomInt=(min=0,max=100)=>{
	return Math.round(Math.random()*(max-min)+ min)
}
const randomFloat=(min=0,max=100,precision=2)=>{
	return parseFloat((Math.random()*(max-min)+ min).toFixed(precision))
}
const randomImg=()=>{
	return imgs[randomInt(0,imgs.length-1)];
}
const randomId=()=>{
	return Math.random().toString(36).substring(2)
}
const randomDate=()=>{
	const year = randomInt(2008,2020);
	const month = randomInt(1,12);
	const day = randomInt(1,31);
	const hour = randomInt(0,23);
	const minute = randomInt(0,59);
	const second = randomInt(0,59);
	return `${year}年${month}月${day}日 ${hour}:${hour}:${second}`
}
export default{
	randomCN,
	randomInt,
	randomFloat,
	randomImg,
	randomId,
	randomDate
}